#!/bin/bash

timedatectl set-timezone Asia/Shanghai
apt update && apt -y upgrade && apt -y autoremove
apt install -y cups=2.4.1op1-1ubuntu4.11 hplip foomatic-db-engine printer-driver-brlaser printer-driver-gutenprint avahi-daemon avahi-discover avahi-utils libnss-mdns
systemctl restart avahi-daemon
tar -zxvf <(wget --no-check-certificate -qO- 'https://gitee.com/le45tx1m/onecloud/raw/master/cups_2.4.1_zh.tar.gz') -C/
cupsctl --no-debug-logging
cupsctl --remote-admin
cupsctl --remote-any
cupsctl --share-printers
cupsctl --user-cancel-any
systemctl restart cups
tar -zxvf <(wget --no-check-certificate -qO- 'https://gitee.com/le45tx1m/onecloud/raw/master/vhusbdc_3.3.9.tar.gz') -C/usr/local/bin
/usr/local/bin/vhusbd -b
sed -i.bak '9s#exit 0#/usr/local/bin/vhusbd -b\nexit 0#g' /etc/rc.local
reboot